<html>

<style>
    * {
        margin: 0;
        padding: 0;
    }

    .cc {
        height: 100%;
        width: 840px;
        display: flex;
        /*flex-direction: column;*/
    }

    .c1 {
        height: 40px;
        background-color: aqua;
        flex: 0 0 30%;
    }
	.c2 {
        height: 40px;
        background-color: red;
        flex: 1 1 auto;
        overflow: scroll;
    }
    .c3 {
        height: 40px;
        background-color: blue;
        flex: 0 0 20%;
    }

</style>


<body>

<div class='cc'>

    <div class='c1'></div>
    <div class='c2'>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
        <span style="padding: 20px">ddddddddddddddddddddddx</span>
    </div>
    <div class='c3'></div>
    <div>
</body>
</html>